/**
 * Author: luoqi
 * Created Date: 2025-11-11 22:19:47
 * Last Modified: 2025-11-20 00:28:58
 * Modified By: luoqi at <**@****>
 * Copyright (c) 2025 <*****>
 * Description:
 */

#ifndef _BSP_H_
#define _BSP_H_

#include <stddef.h>
#include <stdint.h>

#ifndef __weak
#define __weak __attribute__((weak))
#endif

#ifndef UNUSED
#define UNUSED(x) (void)(x)
#endif

int bsp_init(void);

void led_toggle(void);

int kprintf(const char *fmt, ...);

uint64_t ktime(void);

int task_add(const char *name, void (*handle)(void), size_t tick);

int task_suspend(const char *name);

int task_resume(const char *name);

void task_tick_increase(void);

void task_exec(void);

void task_immdiate_override(void);

void *qmalloc(size_t sz);

void qfree(void *ptr);

#endif
